<?php
if ($query->num_rows() > 0) {
    $ga_us = $query->row();
}

$pattern = "%d-%M-%Y";
$dob_user = mdate($pattern, $ga_us->dob_user);
$dob_gardient = mdate($pattern, $ga_us->dob_gardient);
$date_start = mdate($pattern, $ga_us->date_start);

$image_user = './../assets/avatar/images/' . $ga_us->gravatar;
if ($ga_us->gravatar != '') {
    if (file_exists($image_user)) {
        $image_user = root_url('seatting-falin') . 'assets/avatar/images/' . $ga_us->gravatar;
    } else {
        $image_user = root_url('seatting-falin') . 'assets/noimage.gif';
    }
} else {
    $image_user = root_url('seatting-falin') . 'assets/noimage.gif';
}

$image_gardient = './assets/avatar_gardient/thumbs/' . $ga_us->avatar;
if (file_exists($image_gardient) && $ga_us->avatar != null) {
    $image_gardient = base_url() . 'assets/avatar_gardient/thumbs/' . $ga_us->avatar;
} else {
    $image_gardient = root_url('seatting-falin') . 'assets/noimage.gif';
}

$gender_user = $ga_us->gender_user == 'm' ? 'Male' : 'Female';
$gender_gardient = $ga_us->gender_gardient == 'm' ? 'Male' : 'Female';
?>

<div id="wrapper-content" >
    <table class="titrepage" width="100%">
        <tr>
            <td >Détail de la réservation</td>

        </tr>
    </table>

<?php echo form_open(site_url('admin/detail_gardient') . '/' . $ga_us->id); ?>
            <table  width="600px"  class="list">
                <tr>
                    <td align="left" style="color: blue;" colspan="2">Demande</td>
                </tr>
                 <tr>
                    <td width="40%"><label for="title">Etat du paiement:</label></td>
                    <td><?php echo $ga_us->status; ?></td>
                </tr>
                <tr>
                    <td width="40%"><label for="title">Objet:</label></td>
                    <td><?php echo $ga_us->title; ?></td>
                </tr>
                <tr>
                    <td><label for="title">Quel animal ?</label></td>
                    <td><?php echo $ga_us->animal_kind; ?></td>
                </tr>
                <tr>
                    <td><label for="title">Combien d'animaux ?</label></td>
                    <td><?php echo $ga_us->total_animal; ?></td>
                </tr>
                <tr>
                    <td><label for="title">Date début:</label></td>
                    <td><?php echo $date_start; ?></td>
                </tr>
                <tr>
                    <td><label for="title">Nb. Jours total:</label></td>
                    <td><?php echo $ga_us->total_date; ?></td>
                </tr>
                <tr>
                    <td><label for="title">A partir de :</label></td>
                    <td><?php echo $ga_us->hour_start.'h'; ?></td>
                </tr>
                <tr>
                    <td><label for="title">Total heure:</label></td>
                    <td><?php echo $ga_us->total_hour; ?></td>
                </tr>
                <tr>
                    <td><label for="title">Faudra t-il que le gardien lui administre des médicaments durant la mission ?</label></td>
                    <td><?php echo $ga_us->medicaments==1?'Qui':'Non'; ?></td>
                </tr>
                <tr>
                    <td><label for="title">Avez-vous des demandes particulières pour l'habitat du gardien ?</label></td>
                    <td><?php echo $ga_us->habitat; ?></td>
                </tr>
                <tr>
                    <td><label for="Content">Autres demandes:</label></td>
                    <td><?php echo $ga_us->content; ?></td>
                </tr>
                
                <tr>
                    <td><label for="title">Comment avez-vous connu Seatting-falin ?: </label></td>
                    <td><?php echo $ga_us->known ?></td>
                </tr>
                <tr>
                    <td align="left" style="color: blue;">Information du gardien</td>
                    <td></td>
                </tr>
                <tr>
                    <td><img src="<?php echo $image_gardient; ?>" width="100px" alt=""/></td>
                    <td align="center"><label for="avatar"></label></td>
                </tr>
                <tr>
                    <td><label for="first_name">Nom:</label></td>
                    <td><?php echo $ga_us->first_name_gardient; ?></td>
                </tr>
                <tr>
                    <td><label for="last_name">Prénom:</label></td>
                    <td><?php echo $ga_us->last_name_gardient; ?></td>
                </tr>
                <tr>
                    <td><label for="DOB">Anniversaire:</label></td>
                    <td><?php echo $dob_gardient; ?></td>
                </tr>
                <tr>
                    <td><label for="gender">Sexe:</label></td>
                    <td><?php echo $gender_gardient; ?></td>
                </tr>
                <tr>
                    <td><label for="phone">Téléphone:</label></td>
                    <td><?php echo $ga_us->phone_gardient; ?></td>
                </tr>
                <tr>
                    <td><label for="address">Adresse:</label></td>
                    <td><?php echo $ga_us->address_gardient; ?></td>
                </tr>
                <tr>
                    <td><label for="city">Région:</label></td>
                    <td><?php echo $ga_us->city; ?></td>
                </tr>
                <tr>
                    <td><label for="email">Email:</label></td>
                    <td><?php echo $ga_us->email_gardient; ?></td>
                </tr>
                <tr>
                    <td><label for="experience">Expérience:</label></td>
                    <td><?php echo $ga_us->experience; ?></td>
                </tr>
                <br/>
                <tr>
                    <td align="left" style="color: blue;">Information du client</td>
                    <td></td>
                </tr>
                <tr>

                    <td><img src="<?php echo $image_user; ?>" width="100px" alt=""/></td>
                    <td align="center"><label for="avatar"></label></td>
                </tr>
                <tr>
                    <td><label for="first_name">Nom:</label></td>
                    <td><?php echo $ga_us->first_name_user; ?></td>
                </tr>
                <tr>
                    <td><label for="last_name">Prénom:</label></td>
                    <td><?php echo $ga_us->last_name_user; ?></td>
                </tr>
                <tr>
                    <td><label for="DOB">Anniversaire:</label></td>
                    <td><?php echo $dob_user; ?></td>
                </tr>
                <tr>
                    <td><label for="gender">Sexe:</label></td>
                    <td><?php echo $gender_user; ?></td>
                </tr>
                <tr>
                    <td><label for="phone">Téléphone:</label></td>
                    <td><?php echo $ga_us->phone_user; ?></td>
                </tr>
                <tr>
                    <td><label for="mobile">Mobile:</label></td>
                    <td><?php echo $ga_us->mobile_user; ?></td>
                </tr>
                <tr>
                    <td><label for="address">Adresse:</label></td>
                    <td><?php echo $ga_us->address_user; ?></td>
                </tr>
                <tr>
                    <td><label for="email">Email:</label></td>
                    <td><?php echo $ga_us->email_user; ?></td>
                </tr>
            </table>
<?php echo form_close(); ?>
</div>